using UnityEngine;

namespace HEFramework
{
    /// <summary>
    ///
    /// UI窗口行为接口
    /// 
    /// ----------------------------------------
    /// 作者：pan
    /// 创建时间：2022-05-14 14:48:34
    /// ----------------------------------------
    /// </summary>
    public interface IUIWindowBehaviour : IUIBehaviour
    {
        /// <summary>
        /// 标志
        /// </summary>
        string Flag { get; }

        /// <summary>
        /// 状态 销毁【-1】 关闭【0】 打开【1】
        /// </summary>
        int State { get; }

        /// <summary>
        /// 设置标签
        /// </summary>
        /// <param name="_flag"></param>
        IUIWindowBehaviour SetFlag(string _flag);


        /// <summary>
        /// 展示
        /// </summary>
        void Show();

        /// <summary>
        /// 隐藏
        /// </summary>
        void Hide();

        /// <summary>
        /// 销毁
        /// </summary>
        void Destroy();

        /// <summary>
        /// 弹回
        /// </summary>
        void Pop();

        /// <summary>
        /// 释放
        /// </summary>
        void Dispose();


        /// <summary>
        /// 获取画布（自身）
        /// </summary>
        /// <returns></returns>
        IUICanvasBehaviour GetCanvas();

        /// <summary>
        /// 获取画布（根据名称）
        /// </summary>
        /// <param name="_name"></param>
        /// <returns></returns>
        IUICanvasBehaviour GetCanvas(string _name);

        /// <summary>
        /// 获取文本（根据名称）
        /// </summary>
        /// <param name="_name"></param>
        /// <returns></returns>
        IUITextBehaviour GetText(string _name);

        /// <summary>
        /// [TMP]获取文本（根据名称）
        /// </summary>
        /// <param name="_name"></param>
        /// <returns></returns>
        IUITMPTextBehaviour GetTMPText(string _name);

        /// <summary>
        /// 获取图片（根据名称）
        /// </summary>
        /// <param name="_name"></param>
        /// <returns></returns>
        IUIImageBehaviour GetImage(string _name);

        /// <summary>
        /// 获取按钮（根据名称）
        /// </summary>
        /// <param name="_name"></param>
        /// <returns></returns>
        IUIButtonBehaviour GetButton(string _name);

        /// <summary>
        /// 获取滑动条（根据名称）
        /// </summary>
        /// <param name="_name"></param>
        /// <returns></returns>
        IUISliderBehaviour GetSlider(string _name);

        /// <summary>
        /// 获取滑动视图（根据名称）
        /// </summary>
        /// <param name="_name"></param>
        /// <returns></returns>
        IUIScrollViewBehaviour GetScrollView(string _name);

        /// <summary>
        /// 获取输入组件（根据名称）
        /// </summary>
        /// <param name="_name"></param>
        /// <returns></returns>
        IUIInputFieldBehaviour GetInputField(string _name);

        /// <summary>
        /// [Tmp]获取输入组件（根据名称）
        /// </summary>
        /// <param name="_name"></param>
        /// <returns></returns>
        IUITMPInputFieldBehaviour GetTMPInputField(string _name);

        /// <summary>
        /// 获取组件（根据名称）
        /// </summary>
        /// <param name="_name"></param>
        /// <returns></returns>
        Transform GetTransform(string _name);

        /// <summary>
        /// 获取组件（根据名称）
        /// </summary>
        /// <param name="_name"></param>
        /// <returns></returns>
        RectTransform GetRectTransform(string _name);
    }
}